<template>
  <div class="content bounceInRight animated">
    {{username}}
    aaaaa
  </div>
</template>

<script>
export default {
  data () {
    return {
      username: ''
    }
  },
  mounted () {
    // 获取页面传参totalPrice
    // this.totalPrice = this.$route.params.totalPrice (params接收)
    // this.totalPrice = this.$route.query.totalPrice (query)
    // 判断是否有传参
    if (this.$route.params.username) {
      // 如果有的话
      this.username = this.$route.params.username
    } else {
      // 没有就跳到login
      this.$router.push({path: 'Login'})
    }
  }
}
</script>

<style scoped>

</style>
